<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>QuantumWalk: include/state.hpp Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QuantumWalk
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">include/state.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="state_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef STATE_HPP</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define STATE_HPP</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;boost/numeric/ublas/vector.hpp&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="shift_8hpp.html" title="Template class for shift operator. It acts in . It reads , where  is a permutation of vertices...">shift.hpp</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="coin_8hpp.html" title="Template class for coin operator. Coin operator  is a unitary operator in -dimensional Hilbert space...">coin.hpp</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">using namespace </span>boost::numeric::ublas;
<a name="l00027"></a><a class="code" href="classstate.html">00027</a> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keyword">class </span><a class="code" href="classstate.html">state</a>{
<a name="l00028"></a>00028 <span class="keyword">private</span>:
<a name="l00029"></a>00029   std::map&lt;int,vector&lt;T&gt; &gt; data;
<a name="l00030"></a>00030   <span class="keywordtype">int</span> dimV;
<a name="l00031"></a>00031   <span class="keywordtype">int</span> dimD;
<a name="l00032"></a>00032 <span class="keyword">public</span>:
<a name="l00037"></a><a class="code" href="classstate.html#a8b1cf8b55eed202d497054269112327e">00037</a>   <a class="code" href="classstate.html#a8b1cf8b55eed202d497054269112327e">state</a>(){};
<a name="l00042"></a>00042   ~<a class="code" href="classstate.html">state</a>();
<a name="l00048"></a>00048   <a class="code" href="classstate.html">state</a>(<span class="keyword">const</span> <a class="code" href="classstate.html">state</a>&amp; psi);
<a name="l00056"></a>00056   <a class="code" href="classstate.html">state</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classstate.html">state</a>&amp; psi);
<a name="l00065"></a>00065   <a class="code" href="classstate.html">state</a>(matrix&lt;T&gt; m);
<a name="l00066"></a>00066   <span class="comment">//void add_state(int i,vector&lt;T&gt; v);</span>
<a name="l00067"></a>00067   
<a name="l00068"></a>00068   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classshift.html">shift</a>;
<a name="l00069"></a>00069   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcoin.html">coin</a>;
<a name="l00070"></a>00070   
<a name="l00080"></a>00080   <a class="code" href="classstate.html">state</a>&amp; operator*=(<a class="code" href="classshift.html">shift&lt;T&gt;</a>&amp; S);
<a name="l00091"></a>00091   <span class="keyword">friend</span> <a class="code" href="classstate.html">state</a> operator*&lt;&gt;(<span class="keyword">const</span> <a class="code" href="classshift.html">shift&lt;T&gt;</a>&amp; S,<a class="code" href="classstate.html">state</a> psi);
<a name="l00092"></a>00092   
<a name="l00102"></a>00102   <a class="code" href="classstate.html">state</a>&amp; operator*=(<span class="keyword">const</span> <a class="code" href="classcoin.html">coin&lt;T&gt;</a>&amp; C);
<a name="l00103"></a>00103   
<a name="l00113"></a>00113   <span class="keyword">friend</span> <a class="code" href="classstate.html">state</a> operator*&lt;&gt;(<span class="keyword">const</span> <a class="code" href="classcoin.html">coin&lt;T&gt;</a>&amp; C,<a class="code" href="classstate.html">state</a> psi);
<a name="l00114"></a>00114 };
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
<a name="l00117"></a>00117 <a class="code" href="classstate.html">state&lt;T&gt;</a> <a class="code" href="state_8hpp.html#a2dbee0f8557d8030d2424ae0a5d9b363">operator*</a>(<span class="keyword">const</span> <a class="code" href="classshift.html">shift&lt;T&gt;</a>&amp;S, <a class="code" href="classstate.html">state&lt;T&gt;</a> psi);
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
<a name="l00120"></a>00120 <a class="code" href="classstate.html">state&lt;T&gt;</a> <a class="code" href="state_8hpp.html#a2dbee0f8557d8030d2424ae0a5d9b363">operator*</a>(<span class="keyword">const</span> <a class="code" href="classcoin.html">coin&lt;T&gt;</a>&amp;C, <a class="code" href="classstate.html">state&lt;T&gt;</a> psi);
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Oct 9 2012 11:47:52 for QuantumWalk by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
